package com.landinfo.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * VR管理
 * 2019-07-29
 */
@ApiModel(description = "VR管理 2019-07-29")
@Entity
@Table(name = "vr_manage")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class VrManage implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
    @SequenceGenerator(name = "sequenceGenerator")
    private Long id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @Column(name = "title")
    private String title;

    /**
     * 720云地址
     */
    @ApiModelProperty(value = "720云地址")
    @Column(name = "url")
    private String url;

    /**
     * 照片地址
     */
    @ApiModelProperty(value = "照片地址")
    @Column(name = "img_path")
    private String imgPath;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    @Column(name = "x")
    private Double x;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    @Column(name = "y")
    private Double y;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Column(name = "jhi_sort")
    private Integer sort;

    /**
     * 是否启用
     */
    @ApiModelProperty(value = "是否启用")
    @Column(name = "jhi_enable")
    private Boolean enable;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public VrManage title(String title) {
        this.title = title;
        return this;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public VrManage url(String url) {
        this.url = url;
        return this;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImgPath() {
        return imgPath;
    }

    public VrManage imgPath(String imgPath) {
        this.imgPath = imgPath;
        return this;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public Double getX() {
        return x;
    }

    public VrManage x(Double x) {
        this.x = x;
        return this;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public VrManage y(Double y) {
        this.y = y;
        return this;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public Integer getSort() {
        return sort;
    }

    public VrManage sort(Integer sort) {
        this.sort = sort;
        return this;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Boolean isEnable() {
        return enable;
    }

    public VrManage enable(Boolean enable) {
        this.enable = enable;
        return this;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        VrManage vrManage = (VrManage) o;
        if (vrManage.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), vrManage.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "VrManage{" +
            "id=" + getId() +
            ", title='" + getTitle() + "'" +
            ", url='" + getUrl() + "'" +
            ", imgPath='" + getImgPath() + "'" +
            ", x='" + getX() + "'" +
            ", y='" + getY() + "'" +
            ", sort='" + getSort() + "'" +
            ", enable='" + isEnable() + "'" +
            "}";
    }
}
